package day04;

import java.util.Scanner;

public class ScoreLevel {
    public static void main(String[] args) {

        System.out.print("请输入您的成绩：");
        Scanner sc = new Scanner(System.in);
        double score = sc.nextDouble();
        System.out.println("您的成绩为："+score+"分");

        if (score>=0&&score<=100){

            if (score>=90){
                System.out.println("您的成绩等级为：A");
            }else if (score>=80){
                System.out.println("您的成绩等级为：B");
            }else if (score>=70){
                System.out.println("您的成绩等级为：C");
            }else if (score>=60){
                System.out.println("您的成绩等级为：D");
            }else {
                System.out.println("您的成绩等级为：E");
            }
         }else {
            System.out.println("成绩不合法");
        }

    }

}
